home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / MATH / NRPAS13 / EVLMEM.DEM < prev    next >
Text File  |  1991-04-29  |  763b  |  36 lines

  1. PROGRAM d12r10(input,output,dfile);
  2. (* driver for routine EVLMEM *)
  3. CONST
  4.    n=1000;
  5.    m=10;
  6.    nfdt=16;
  7. TYPE
  8.    glnarray = ARRAY [1..n] OF real;
  9.    glmarray = ARRAY [1..m] OF real;
  10. VAR
  11.    i : integer;
  12.    fdt,pm : real;
  13.    cof,wkm : glmarray;
  14.    data,wk1,wk2 : glnarray;
  15.    dfile : text;
  16.  
  17. (*$I MODFILE.PAS *)
  18. (*$I MEMCOF.PAS *)
  19.  
  20. (*$I EVLMEM.PAS *)
  21.  
  22. BEGIN
  23.    glopen(dfile,'spctrl.dat');
  24.    FOR i := 1 to n DO BEGIN
  25.       read(dfile,data[i])
  26.    END;
  27.    close(dfile);
  28.    memcof(data,n,m,pm,cof,wk1,wk2,wkm);
  29.    writeln('Power spectum estimate of data in SPCTRL.DAT');
  30.    writeln(' ':4,'f*delta',' ':7,'power');
  31.    FOR i := 0 to nfdt DO BEGIN
  32.       fdt := 0.5*i/nfdt;
  33.       writeln (fdt:12:6,evlmem(fdt,cof,m,pm):12:6)
  34.    END
  35. END.
  36.